﻿/*
 *           VirtualStaticVoid
 *  http://dotnet.org.za/virtualstaticvoid
 *  
 */
using System;
using System.Windows.Forms;

namespace FixxVS
{
	public static class ControlInvokeSupport
	{
		public delegate void Action();

		public static void SafeInvoke(this Control control, Action action)
		{
			if (control.InvokeRequired)
				control.EndInvoke(control.BeginInvoke(action));
			else
				action();
		}
	}
}
